package com.kkb.controller;

import com.kkb.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/ajax")
public class AjaxController {
    @PostMapping("/testAjax")
    public List<User> ajaxPostTestAjax(@RequestBody User user){
        ArrayList arrayList = new ArrayList();
        arrayList.add(user);
        arrayList.add(user);
        return arrayList;
    }
    @GetMapping("/getAjax")
    public String ajaxGetTestAjax(Integer id, String username, String sex){
        System.out.println(id);
        return "xxx";
    }
}
